package utils.csv.reflect;

import java.lang.reflect.Field;

/**
 * Created by chen on 17/4/25.
 * csvField 对要导出的数据的字段类型的封装
 */
public class CsvField {
    /** 字段顺序 */
    private Integer order;
    /** 字段Field */
    private Field field;

    /** 日期格式化字符串 */
    private String datePattern;
    /** 指定是否是金额 */
    private boolean isAmount;

    private boolean notIgnore;

    public boolean isAmount() {
        return isAmount;
    }

    public void setIsAmount(boolean isAmount) {
        this.isAmount = isAmount;
    }

    public CsvField(Integer order, Field field) {
        this.order = order;
        this.field = field;
    }

    public CsvField(Integer order, Field field, Boolean notIgnore) {
        this.order = order;
        this.field = field;
        this.notIgnore = notIgnore;
    }

    public CsvField(Integer order, Field field, boolean isAmount, boolean notIgnore) {
        this.order = order;
        this.field = field;
        this.isAmount = isAmount;
        this.notIgnore = notIgnore;
    }

    public String getDatePattern() {
        return datePattern;
    }

    public void setDatePattern(String datePattern) {
        this.datePattern = datePattern;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Field getField() {
        return field;
    }

    public void setField(Field field) {
        this.field = field;
    }

    public void setAmount(boolean amount) {
        isAmount = amount;
    }

    public boolean isNotIgnore() {
        return notIgnore;
    }

    public void setNotIgnore(boolean notIgnore) {
        this.notIgnore = notIgnore;
    }
}
